<?php
    use think\Request;
    $request = Request::instance();

    //菜单查询 type-1:后台菜单  type-2:前端导航
    $left_menu_list = db('menu')->where('type', 1)->order('sort', 'DESC')->select();
    $c = $request->controller();
?>
<div class="tpl-left-nav tpl-left-nav-hover">
    <div class="tpl-left-nav-title">菜单列表</div>
    <div class="tpl-left-nav-list">
        <ul class="tpl-left-nav-menu">

            <!-- 列表循环 -s-->
            {volist name="left_menu_list" id="menus"}
            <li class="tpl-left-nav-item">
                <a href="/{$menus.m}/{$menus.c}/{$menus.a}" class="nav-link {if $c==$menus.c}active{/if}">
                    <i class="am-icon-gear {if $c==$menus.c}am-icon-spin{/if}"></i>
                    <span>{$menus.name}</span>
                </a>
            </li>
            {/volist}
            <!-- 列表循环 -e-->
            <li class="tpl-left-nav-item">
                <a href="login.html" class="nav-link">
                    <i class="am-icon-key"></i>
                    <span>登录</span>
                </a>
            </li>

        </ul>
    </div>
</div>